{extend name="index_layout"/}
{block name="main"}
<form class="layui-form" method="post">
    <input type="hidden" name="id" value="{$data.id}" />
    {:token()}
    <div class="layui-form-item">
        <label class="layui-form-label">团队名称</label>
        <div class="layui-input-block">
            <input type="text" disabled value="{$data.team_name}" autocomplete="off" placeholder="团队名称" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">用户名</label>
        <div class="layui-input-block">
            <input type="text" disabled lay-verify="required" autocomplete="off" placeholder="用户名" class="layui-input" value="{$data.username}">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">真实姓名</label>
        <div class="layui-input-block">
            <input type="text"  disabled autocomplete="off" placeholder="真实姓名" class="layui-input" value="{$data.nickname}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">审核</label>
        <div class="layui-input-block" onclick="showReason()">
            <input type="radio" name="row[status]" value="1" title="通过" {if $data.status==1}checked{/if}>
            <input type="radio" name="row[status]" value="3" title="拒绝" {if $data.status==0}checked{/if}>
        </div>
    </div>

    <div class="layui-form-item" style="display: none" id="reasonShow">
        <label class="layui-form-label">不通过的原因</label>
        <div class="layui-input-block">
            <input id="c-no_reason" class=" layui-input" name="row[reason]" type="text" value="">
        </div>
    </div>

    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    function showReason() {
        var status = $("input[name='row[status]']:checked").val()
        if (status == 1) {
            $('#reasonShow').hide()
            $('#reason').val('')
        } else {
            $('#reasonShow').show()
        }

    }
layui.use('yznForm', function() {
    var yznForm = layui.yznForm;
    yznForm.bindevent($("form.layui-form"));
});
</script>

{/block}